home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hottest 6
/
Hottest 6 (1996)(PDSoft)[!].iso
/
software
/
fredfish
/
1074.lha
/
Programs
/
C_dt
/
source
/
Makefile
< prev
next >
Wrap
Makefile
|
1995-03-30
|
2KB
|
107 lines
#
# $PROJECT: c.datatype
#
# $VER: Makefile 39.2 (19.03.95)
#
# by
#
# Stefan Ruppert , Windthorststraße 5 , 65439 Flörsheim , GERMANY
#
# (C) Copyright 1995
# All Rights Reserved !
#
# $HISTORY:
#
# 19.03.95 : 039.002 : changed to gnu make
# 06.03.95 : 039.001 : initial
#
NAME = c.datatype
SHNAME = cdt
REVFILE = c_rev.i
OBJDIR = /objs/cdt
ADOBJDIR = $(subst /objs/,objs:,$(OBJDIR))
LIBS = $(OBJDIR)/$(NAME)
ADLIBS = $(ADOBJDIR)/$(NAME)
LIBSDEST = Sys:Classes/DataTypes
HEADER = classbase.h
PROTO = protos.h
CSRCS = classbase.c dispatch.c cdt.tab.c
ASRCS = classinit.asm endcode.asm
SRCS = $(ASRCS) $(CSRCS)
OBJ = classinit.ao $(CSRCS:%.c=%.o) endcode.ao
OBJS = $(patsubst %,$(OBJDIR)/%,$(OBJ))
ADOBJS = $(patsubst %,$(ADOBJDIR)/%,$(OBJ))
##############################################################################
#
# commands
#
YACC = bison
SED = sed
MV = mv
RM = rm
CP = c:copy
##############################################################################
#
# SAS definition
#
DEBUG = DEBUG=LINE DEFINE=DEBUG DEFINE="YYDEBUG=1"
SCOPTS = VERBOSE NOSTKCHK
SLOPT = NOICONS VERBOSE SMALLDATA SMALLCODE
SCOPTIMIZE = CPU=68040
LIB = lib:amiga.lib lib:sc.lib lib:debug.lib
all: $(OBJDIR) $(LIBS)
$(LIBS): $(OBJS)
slink from $(ADOBJS) to $(ADLIBS) $(SLOPT) LIB $(LIB)
$(CP) $(ADLIBS) $(LIBSDEST)
include gnu:share/gmk/sasc.mk
cdt.tab.c: cdt.y
$(YACC) -b cdt -p cdtparse_ cdt.y
$(SED) -e 's/yyparse()/yyparse(struct ClassBase \*cb,struct CParse \*cparse)/g' \
-e 's/int yyparse (void);/int yyparse(struct ClassBase \*cb,struct CParse \*cparse);/g' \
-e 's/yychar = YYLEX;/yychar = yylex(\&yylval,cb,cparse);/g' \
-e 's/yyerror("parse error");/cdtparse_parseerror(cb,cparse);/g' \
cdt.tab.c > tmp_sed
$(MV) tmp_sed cdt.tab.c
##############################################################################
#
# explicit dependencies
#
$(OBJDIR)/classinit.ao: $(REVFILE) # revision dependency
$(OBJS): $(HEADER) # header dependency
##############################################################################
#
# make the object directory
#
$(OBJDIR):
mkdir $(OBJDIR)
##############################################################################
#
# clean up
#
clean:
$(RM) -R $(OBJDIR)/* *.tab.c